// TestFileSystem.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include "LFilePack.h"
#include <Windows.h>

#define PACK_FILE L"testPack3.pak"
#define _WRITE
int _tmain(int argc, _TCHAR* argv[])
{
	CLFilePack t_Pack;
	bool bRet = false; 
	int nStart = GetTickCount();
#ifdef _WRITE
	bRet = t_Pack.open(PACK_FILE, e_LWrite, true );

	//bRet = t_Pack.addFile( L"test_pack\\100_2545.bmp");
	//bRet = t_Pack.addFile( L"test_pack\\100_2546.bmp");
	//bRet = t_Pack.addFile( L"test_pack\\100_2547.bmp");
	//bRet = t_Pack.addFile( L"test_pack\\100_2548.bmp");

	bRet = t_Pack.pack_dir( L"test_pack" );
	bRet = t_Pack.save();

#else
	bRet = t_Pack.open( PACK_FILE, e_LRead );
	bRet = t_Pack.unpack(L"un_pack");

#endif

	int nEnd = GetTickCount() - nStart;
	printf("Cost time %d\n", nEnd );

	getchar();
	return 0;
}

